<template>
  <el-form :model="model" ref="equipmentMagForm" :inline="true" label-width="72px" :label-position="'left'">
    <el-row class="search-title">条件搜索</el-row>
    <el-form-item prop="ComplaintsObj">
      <el-input v-model="model.complaints_obj" prefix-icon="el-icon-search" placeholder="投诉对象" clearable></el-input>
    </el-form-item>
    <el-form-item>
      <el-button class="btn-search" type="primary" @click="handleQueryParkingMag">搜索</el-button>
    </el-form-item>
    <collapse-vertical>
      <div v-show="isDisplay">
        <div>
          <el-form-item prop="ComplaintsType" label="投诉类型">
            <el-radio-group v-model="model.complaints_type" size="small">
              <el-radio   v-for="item in ComplaintsType" :label="item.id" style="color: white">{{item.value}}</el-radio>
            </el-radio-group>
          </el-form-item>
        </div>
        <div>
          <el-form-item prop="park_status" label="处理状态">
            <el-radio-group v-model="model.handle_status" size="small">
              <el-radio   v-for="item in handleStatus" :label="item.id"  style="color: white">{{item.value}}</el-radio>
            </el-radio-group>
          </el-form-item>
        </div>
        <el-form-item prop="park_date" label="开始时间">
          <el-date-picker v-model="model.start_time" type="date" placeholder="选择开始时间" clearable format="yyyy 年MM 月dd 日"
                          value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
        <el-form-item prop="park_date" label="结束时间">
          <el-date-picker v-model="model.end_time" type="date" placeholder="选择结束时间" clearable format="yyyy 年MM 月dd 日"
                          value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button class="btn-mini-form" type="primary" style="color: white" @click="handleQueryParkingMag"
                     size="mini">提交
          </el-button>
          <el-button class="btn-mini-form" type="primary" style="color: white" @click="handleResetParkingMag"
                     size="mini">重置
          </el-button>
        </el-form-item>
      </div>
    </collapse-vertical>
    <el-row style="text-align: center"><el-button style="border: none;background-color: transparent" size="small" @click="isShow" :icon="isDisplay?'el-icon-arrow-up':'el-icon-arrow-down'"></el-button></el-row>
  </el-form>
</template>

<script>
  /* eslint-disable */
  import ElFormItem from "element-ui/packages/form/src/form-item";
  import CollapseVertical from '../../../utils/collapseVertical'

  export default {
    components: {
      ElFormItem,
      CollapseVertical
    },
    name: "equipment-mag-form",
    created() {
    },
    data() {
      return {
        dialogDwVisibleParkingMag: false,
        isDisplay: false,
        model: {
          complaints_obj: '',
          complaints_type: '',
          complaints_count: '',
          start_time:'',
          end_time:'',
          handle_status: '',
          handle_result:'',
          handle_people:'',
          finish_time:'',
          complaints_people:'',
          complaints_phone:'',
          complaints_channel:'',
          complaints_time:'',
          complaints_text:''
        },
        ComplaintsType: [
          { id: '0', value: '乱收费' },
          { id: '1', value: '私占停车位' },
          { id: '2', value: '停车场挪作他用' },
        ],
        handleStatus: [
          { id: '0', value: '未处理' },
          { id: '1', value: '处理中' },
          { id: '2', value: '已完成' },
        ],

      }
    },
    methods: {
      handleQueryParkingMag() {
        this.$emit('handleQueryParkingMag', this.model)
      },
      handleResetParkingMag() {
        this.$refs['equipmentMagForm'].resetFields()
      },
      initData() {
        this.$emit('handleQueryParkingMag', this.model);

        /*        selDictonary().then(res => {
                  for (var item in res) {
                    if (res[item].id == "roadkind") {//
                      this.roadkinds = res[item].comboboxDetailList
                    } else if (res[item].id == "enableflag") {
                      this.parkstatuss = res[item].comboboxDetailList
                    }
                  }
                })
                getChargeStandard().then(res => {
                  this.sfbzs = res
                })*/
      },
      isShow(){
        this.isDisplay =!this.isDisplay
      }

    }
  }
</script>

<style scoped>

</style>
